/**
 * @author zhangshuai
 * @version V1.0
 * @Project Java2_26
 * @Package PACKAGE_NAME
 * @Description:
 * @Date 2025/5/14 11:25
 */

public class InstanceofTest {

    //instanceof 关键字  检查对象是否是指定类型

    public static void main(String[] args) {
        //1.
        Object obj = new String();//小类转成父类
        System.out.println(obj instanceof String);//判断obj是否为String类型
    }


}